// vite.config.ts
import { defineConfig, loadEnv } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/vite@4.3.9_sass@1.62.1/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/@vitejs+plugin-vue@4.1.0_vite@4.3.9_vue@3.2.47/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import { createSvgIconsPlugin } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@4.3.9/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import Unocss from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/vite.mjs";
import { presetUno, presetAttributify, presetIcons } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/index.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      Unocss({
        // 使用Unocss
        presets: [presetUno(), presetAttributify(), presetIcons()]
      }),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
        // 相对路径别名配置，使用 @ 代替 src
      }
    },
    // scss全局变量的配置
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      },
      postcss: {
        plugins: [
          // px2rem({
          //   remUnit: 192,
          // }),
          // postcssPxToViewport({
          //   viewportWidth: 1920,   //---基于1920宽度为100vw
          //   // exclude: [/service\.vue/]
          //   exclude: [/\/service\//, /service\/index\.vue$/]
          // })
        ]
      }
    },
    build: {
      outDir: "guangan_dist",
      //指定输出路径
      assetsDir: "assets"
      // 指定生成静态资源的存放路径
    },
    //代理跨域
    server: {
      host: "0.0.0.0",
      publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
      proxy: {
        [env.VITE_APP_BASE_API]: {
          //获取数据的服务器地址设置
          target: env.VITE_SERVE,
          //需要代理跨域
          changeOrigin: true,
          logLevel: "debug"
          //路径重写
          // rewrite: (path) => path.replace(/^\/api/, ''),
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFw4NjE4MlxcXFxEZXNrdG9wXFxcXHdvcmtcXFxcXHU1RTdGXHU1Qjg5XFxcXGd1YW5nYW5fZnJvbnRcXFxcZ3VhbmdhblwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcODYxODJcXFxcRGVza3RvcFxcXFx3b3JrXFxcXFx1NUU3Rlx1NUI4OVxcXFxndWFuZ2FuX2Zyb250XFxcXGd1YW5nYW5cXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzLzg2MTgyL0Rlc2t0b3Avd29yay8lRTUlQjklQkYlRTUlQUUlODkvZ3Vhbmdhbl9mcm9udC9ndWFuZ2FuL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52I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